﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WebForm/MasterPage.master"
    CodeFile="ManageDescriptionUpload.aspx.vb" Inherits="WebForm_ManageDescriptionUpload" %>
<%@ Register Namespace="My" TagPrefix="cc1" %>
<%@ Register Assembly="App_Code" Namespace="My" TagPrefix="My" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<TABLE id="table1" cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD align=center><TABLE cellSpacing=0 cellPadding=0 width="99%" border=0><TBODY><TR><TD align=left><My:MyGridView id="gv" runat="server" meta:resourcekey="gv" SkinID="pager" AllowPaging="True" AllowSorting="True" DataSourceID="gv_DS" DataKeyNames="ParameterType,ParameterName" PageSize="30">
<FooterStyle BackColor="White" BorderWidth="0px"></FooterStyle>

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:TemplateField HeaderText="NO" InsertVisible="False"><ItemTemplate>
                                            <%#gv.PageIndex * gv.PageSize + gv.Rows.Count + 1%>
                                        
</ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Text" SortExpression="Text" meta:resourceKey="gvText">
<ItemTemplate>
                <asp:Label ID="lblText" runat="server" Text='<%# Bind("ParameterText") %>'></asp:Label>
            
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Value" SortExpression="Value" meta:resourceKey="gvValue"><EditItemTemplate>
                <asp:HyperLink runat="server" ID="hlinkValue" Text='<%# Bind("ParameterValue") %>'></asp:HyperLink>
&nbsp;<asp:FileUpload id="hiFileUpload" runat="server" __designer:wfdid="w3"></asp:FileUpload> <IMG style="DISPLAY: none" id="imageLogo" name="imageLogo" /> 
<asp:Button id="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="button" SkinID="button" Text="上傳" __designer:wfdid="w4" ValidationGroup="vInsert"></asp:Button> 
<%--<asp:ImageButton ID="btnAdd" ImageUrl="~/images/image/but_18.jpg" OnClick="btnAdd_Click" ValidationGroup="vInsert" runat="server" />
--%>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" __designer:wfdid="w5" ValidationGroup="vInsert" ControlToValidate="hiFileUpload" Display="None" ErrorMessage="請選擇上傳檔案!!">*</asp:RequiredFieldValidator> 
</EditItemTemplate>
<ItemTemplate>
                <asp:HyperLink runat="server" ID="hlinkValue" Text='<%# Bind("ParameterValue") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><EditItemTemplate>
<asp:LinkButton id="linkbCancel" runat="server" meta:resourcekey="linkbCancel" __designer:wfdid="w161" CommandName="Cancel" ForeColor="Black"></asp:LinkButton> 
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton id="linkbEdit" runat="server" CommandName="Edit" meta:resourcekey="linkbEdit"></asp:LinkButton>
</ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
</Columns>

<PagerSettings Position="Top"></PagerSettings>
</My:MyGridView> 
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
            ShowSummary="False" ValidationGroup="vInsert" />
<asp:SqlDataSource id="gv_DS" runat="server" DeleteCommand="DELETE FROM [FD_SystemParameter] WHERE [ParameterType] = @ParameterType AND [ParameterName] = @ParameterName" SelectCommand="SELECT * FROM [FD_SystemParameter] where ParameterType='Description' and ParameterName='FilePath' and Active='Y'" UpdateCommand="UPDATE [FD_SystemParameter] SET [ParameterValue] = @ParameterValue, [ParameterText] = @ParameterText, [Active] = @Active WHERE [ParameterType] = @ParameterType AND [ParameterName] = @ParameterName" ConnectionString="<%$ ConnectionStrings:connStr %>" InsertCommand="INSERT INTO [FD_SystemParameter] ([ParameterType], [ParameterName], [ParameterValue], [ParameterText], [Active]) VALUES (@ParameterType, @ParameterName, @ParameterValue, @ParameterText, @Active)"><DeleteParameters>
<asp:Parameter Name="ParameterType" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterName" Type="String"></asp:Parameter>
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ParameterValue" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterText" Type="String"></asp:Parameter>
<asp:Parameter Name="Active" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterType" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterName" Type="String"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ParameterType" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterName" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterValue" Type="String"></asp:Parameter>
<asp:Parameter Name="ParameterText" Type="String"></asp:Parameter>
<asp:Parameter Name="Active" Type="String"></asp:Parameter>
</InsertParameters>
</asp:SqlDataSource>&nbsp; </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

</asp:Content>
